package com.example.qqviewspringboot.data;

import java.time.LocalDateTime;

public class Conversation {

    private Long friendId;
    private String friendUsername;
    private String content;
    private LocalDateTime timestamp;

    // 无参构造函数：Spring Data JPA 需要它来创建对象
    public Conversation() {}

    // 构造函数
    public Conversation(Long friendId, String friendUsername, String content, LocalDateTime timestamp) {
        this.friendId = friendId;
        this.friendUsername = friendUsername;
        this.content = content;
        this.timestamp = timestamp;
    }

    // Getter 和 Setter 方法
    public Long getFriendId() {
        return friendId;
    }

    public void setFriendId(Long friendId) {
        this.friendId = friendId;
    }

    public String getFriendUsername() {
        return friendUsername;
    }

    public void setFriendUsername(String friendUsername) {
        this.friendUsername = friendUsername;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public LocalDateTime getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(LocalDateTime timestamp) {
        this.timestamp = timestamp;
    }
}
